Executing scripts from the torso is definitely not my strong point, but after a little tinkering.. I did NOT add what I did to the [local.f] area, just [local.i], so when i tested with 2 players only 1 could bash with the 5000 speed, the other player only did the 200 power bash, but he did not move, just his target. so clean this up how you wish and add it to the bottom where i didn't. Let me know how this works for you, it worked perfect for me.
Code:
main:
for (local.i = 1; local.i <= local.default.size; local.i++)
{
local.t = local.default[local.i][1]
if (level.push[local.t] == NIL)
{
level.push[local.t] = local.default[local.i][2]
}
}
thread push_2
end
push_2:
local.power = 200
for (local.i = 1; local.i <= $player.size; local.i++)
{
for (local.f = $player.size; local.f > 0; local.f--)
{
if ($player[local.i].fireheld == 1)
{
//lets give it direction...
local.start = $player[local.i] gettagposition "eyes bone"
local.fwd_vec = angles_toforward $player[local.i].viewangles
local.target = (trace local.start (local.start + ( local.fwd_vec * 10000 ))) //<- 10,000 = range of your bash trigger
local.trig = spawn trigger_push angle self.angle //<- push trigger go
local.trig.origin = local.target
local.trig speed 5000 // <- how far it will push, 5000 was for testing
wait 0.15 //small wait, doesn't matter how short, longer wait will make trigger stay long after bash
local.trig remove //delete trigger when we're done
// local.dir = (angles_toforward $player[local.i].viewangles)
// $player[local.i] pusher $player[local.f] $player[local.f] local.target local.power
}
else if ($player[local.f].fireheld == 1)
{
local.dir = (angles_toforward $player[local.f].viewangles)
$player[local.i] pusher $player[local.f] $player[local.f] local.dir local.power
}
}
}
end